"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MPromise_1 = require("./MPromise");
var MKeysInstance = /** @class */ (function () {
    function MKeysInstance() {
    }
    MKeysInstance.prototype.initMKeys = function () {
        // 测试promise
        MPromise_1.MPromise.initMPromise();
        // this.constructorKey();
        // this.asKey();
    };
    // 1.constructor：this['constructor']函数类型(function)
    // 2.name：MKeysInstance 需在 tsconfig.json 增加 "lib": [ es2015.promise ]
    MKeysInstance.prototype.constructorKey = function () {
        console.log(this['constructor']); //function MKeysInstance() { … }
        console.log(this['constructor'].name); //MKeysInstance
        this.testConstructor(this['constructor']);
    };
    MKeysInstance.prototype.testConstructor = function (cName) {
        new cName().testConstructor2();
    };
    MKeysInstance.prototype.testConstructor2 = function () {
        //console.log('testConstructor2');
    };
    // 2.as(类型断言)：值 as 类型
    MKeysInstance.prototype.asKey = function () {
        //1.
        var val = 1;
        var str = val;
        console.log(typeof (str)); //number类型
    };
    MKeysInstance.Instance = new MKeysInstance();
    return MKeysInstance;
}());
var ConstructorTest = /** @class */ (function () {
    function ConstructorTest() {
        console.log('ConstructorTest');
    }
    return ConstructorTest;
}());
exports.MKeys = MKeysInstance.Instance;
